package com.duowei.diandan.bean.food;

import com.duowei.diandan.db.entry.Jyxmsz;

/**
 * 单品赠送、加价项
 */

public class PresentOrAddPrice implements FoodImpl {

    private Jyxmsz item;
    private boolean checked;
    private boolean showPrice;

    public PresentOrAddPrice(Jyxmsz item, boolean showPrice) {
        this.item = item;
        this.showPrice = showPrice;
    }

    public Jyxmsz getItem() {
        return item;
    }

    public void setItem(Jyxmsz item) {
        this.item = item;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    @Override
    public String getImgNo() {
        return item.getTm();
    }

    @Override
    public String getName() {
        return item.getXmmc();
    }

    @Override
    public Float getPrice() {
        return item.getXsjg();
    }

    @Override
    public Float getMemberPrice() {
        return item.getMemberPrice();
    }

    @Override
    public Float getXl() {
        if (item != null) {
            return item.getXl();
        } else {
            return null;
        }
    }

    public boolean isShowPrice() {
        return showPrice;
    }

    public void setShowPrice(boolean showPrice) {
        this.showPrice = showPrice;
    }

}
